package com.yitong;

import com.yitong.main.PluginMainConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
@Slf4j
public class PluginMainApplication {
    public static ConfigurableApplicationContext application;
    public static ConfigurableApplicationContext run(Class<?> classa, String... args){
        application=new SpringApplicationBuilder( classa ).sources( PluginMainConfig.class ).run( args );
        System.out.println("启动完毕");
        application.publishEvent( application );
        return application;
    }





    public static ConfigurableApplicationContext getApplication() {
        return application;
    }
}
